import QtQuick 1.0

Rectangle {
    width: 360
    height: 640

    Text {
	id: text1
	text: "Here's a map"
	anchors.horizontalCenter: parent.horizontalCenter
    }

    OviMapTile {
	id: map1

	anchors.top: text1.bottom
	anchors.horizontalCenter: parent.horizontalCenter
	width: 100
	height: 100
	latitude: 52.531
	longitude: 13.3845
	zoom: 17
    }

    Text {
	id: text2
	anchors.top: map1.bottom
	anchors.topMargin: 30
	text: "Here's another map"
	anchors.horizontalCenter: parent.horizontalCenter
    }

    OviMapTile {
	id: map2
	anchors.top: text2.bottom
	anchors.horizontalCenter: parent.horizontalCenter
	width: 340
	height: 300
	latitude: 52.531
	longitude: 13.3845
	zoom: 5
    }


    Rectangle {
	width: 150
	height: 40
	color: "blue"
	anchors.margins: 10
	anchors.top: map2.bottom
	anchors.left: parent.left

	Text {
	    color: "white"
	    text: "Zoom out"
	    anchors.centerIn: parent
	}
	MouseArea {
	    anchors.fill: parent
	    onClicked: map2.zoom--
	}
    }
    Rectangle {
	width: 150
	height: 40
	color: "blue"
	anchors.margins: 10
	anchors.top: map2.bottom
	anchors.right: parent.right

	Text {
	    color: "white"
	    text: "Zoom in"
	    anchors.centerIn: parent
	}
	MouseArea {
	    anchors.fill: parent
	    onClicked: map2.zoom++
	}
    }

    Image {
       source: "close.png"
       anchors.right: parent.right
       anchors.top: parent.top
       anchors.margins: 10

       MouseArea {
	   anchors.fill: parent
	   onClicked: Qt.quit()
       }
   }
}
